home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / MATHS / RLAB / RLAB125.ZIP / !RLaB / examples / memtest < prev    next >
Text File  |  1995-04-25  |  411b  |  21 lines

  1. //
  2. // Beginning of test file `test.r' (just `load(test.r)' to test the
  3. // memory problem)
  4. //
  5. load("estimate.r");
  6. rand ("uniform", 0, 1);
  7. B = rand(10,10)/20+eye(10,10);
  8. x = [1:10]';
  9. f = B*x;
  10. ans = 0;
  11. h = [0;0;0;0;0;0;1;0;0;0];
  12. for (i in 1:10) {
  13.   ans[i] = 0;
  14.   for (j in 1:5) {
  15.     ans[i] = ans[i] + estimate(B, f, h, 10, 2^i);
  16.     system("ps -aux | grep rlab");
  17.   }
  18.   ans[i] = ans[i] / 5
  19. }
  20. write("stdout",ans);
  21.